﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo05211
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入你要执行的任务：“炒菜”，“传菜”");
            string a = Console.ReadLine();

            Robot r;
            switch (a)
            {
                case "炒菜":
                    r = new CookRobot("小厨神",Foodtype.粤菜);
                    break;
                case "传菜":
                    r = new DeliveryRobot("飞毛腿",1.5);
                    break;
                default:
                    Console.WriteLine("你不选，那我就自己炒喽!");
                    r = new CookRobot("校长",Foodtype.闽菜);
                    break;
            }
            RobotRtue(r);
        }
        static void RobotRtue(Robot r) 
        {
            r.Working();
        }
    }
}
